package com.szpx.controller.LiGecontroller;

import com.szpx.entity.User;
import com.szpx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;
@Controller
public class LiGeController {
    @Autowired
    private UserService userService;


    //查看用户详情
    @GetMapping("/SearchIndex")
    public String searchIndex(Model model){
        //有一组数据需要带给视图
        List<User> us=userService.selectAllUser();

        model.addAttribute("uview",us);
        //返回逻辑视图(也就是常说的页面)
        return "LiGe/LiGe_Model";
    }

}
